/* -------------------------------------------------------------------------------------
* 	ID:						$Id: general.js 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision$
* 	zuletzt geaendert von:	$Author$
* 	Datum:					$Date$
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

function uhr() {
	UR_Nu = new Date;
	UR_Indhold = showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());
	$("#uhr").html(UR_Indhold);
	setTimeout("uhr()",1000);
}
function showFilled(Value) {
	return (Value > 9) ? "" + Value : "0" + Value;
}

$(function() {
	$('.button').hover(function() {
		$(this).addClass('button_hover');
	}, function() {
		$(this).removeClass('button_hover');
	});
	uhr();
	setTimeout('$(".clock,.language_flags").fadeIn()', 1100);
	if($("#sessioncounter"))
		setTimeout('$("#sessioncounter").fadeIn()', 1100);
		
	$('button.button').each(function(){
		if($(this).html() == 'Speichern' || $(this).attr('type') == 'submit' || $(this).html() == 'Save'){
			$(this).addClass('button_save');
		}
		$(this).attr('role','button');
		
		if($(this).children().length > 0){
			var _img = $(this).find('span').attr('class').substring(7,50);
			$(this).find('span').css('background-image', 'url(images/icons/'+_img+'.png)');
		}
	});
	
	$('a.button').each(function(){
		if($(this).find('span').length > 0) {
			var _img = $(this).find('span').attr('class').substring(7,50);
			$(this).find('span').css('background-image', 'url(images/icons/'+_img+'.png)');
		}
	});
	$('.boxCenter').fadeIn(800);
	$('noscript').remove();
});
